package com.hfmall.service.impl;

import com.hfmall.entity.HfValue;
import com.hfmall.mapper.HfValueMapper;
import com.hfmall.service.IHfValueService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liclo
 * @since 2021-08-12
 */
@Service
public class HfValueServiceImpl extends ServiceImpl<HfValueMapper, HfValue> implements IHfValueService {
    @Resource
    HfValueMapper hfValueMapper;
    @Override
    public List<HfValue> getValueByClassId(int classId) {
        return hfValueMapper.getValueByClassId(classId);//查询规格值
    }

    /**
     * 获取对应规格的值,不重复
     *
     * @param className
     * @return List<String>
     */
    @Override
    public List<String> getAllOnceValueByClassName(String className) {
        return hfValueMapper.getAllOnceValueByClassName(className);
    }
}
